﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Text;

namespace SZORM.Infrastructure.Interception
{
    public interface DbCommandInterceptor
    {
        void ReaderExecuting(DbCommand command, DbCommandInterceptionContext<IDataReader> interceptionContext);
        void NonQueryExecuting();
        void ReaderExecuted(DbCommand command, DbCommandInterceptionContext<IDataReader> interceptionContext);

        void NonQueryExecuting(DbCommand command, DbCommandInterceptionContext<int> interceptionContext);
        void NonQueryExecuted(DbCommand command, DbCommandInterceptionContext<int> interceptionContext);

        void ScalarExecuting(DbCommand command, DbCommandInterceptionContext<object> interceptionContext);
        void ScalarExecuted(DbCommand command, DbCommandInterceptionContext<object> interceptionContext);
    }
}
